import HomeView from '@/views/HomeView.vue'
// import NotFound from '@/views/NotFound.vue'
// import SearchView from '@/views/SearchView.vue'
import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'

const router = createRouter({
  // history: createWebHashHistory(),
  history: createWebHistory(),
  routes: [ // 路由配置表
    {path:'/find',component:()=>import('@/views/FindView.vue')},
    {path:'/my',component:()=>import('@/views/MyView.vue')},
    {path:'/friend',component:()=>import('@/views/FriendView.vue')},
    {path:'/home',component:HomeView},
    // {path:'/search/:keyword?',component:SearchView},
    {path: '/home', component: ()=> import('@/views/HomeView.vue')},
    {name: 'search', path: '/search/:keyword?', component: ()=> import('@/views/SearchView.vue')},
    {path: '/:catchAll(.*)', component: ()=> import('@/views/NotFound.vue') }
  ]
})

export default router